export const findRoute = (routerList,path,startPath)=>{
    const currentPath = path[0]=="/"? path.split("/").slice(1):path.split("/");
    const finds = routerList.find(item=>{
      return (item.path=="/"+currentPath[0] &&!item.redirect)||(item.path==startPath&&!item.redirect)
    })
    if(!(finds?.routes)){
      return finds;
    }
    return findRoute(finds.routes,currentPath.join('/'),startPath);
}